package com.ai.module.chat.test;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**

 * @author: MrHeg
 * @create: 2023-08-30 22:33
 * @description:
 **/
//@RestController
//@RequestMapping("hello")

public class HelloWordController {
    @Resource
    JdbcTemplate jdbcTemplate;

    @Resource
    private RedisTemplate redisTemplate;

    @GetMapping
    public String test() {
        String sql=" select *  from test";
        System.out.println("jdbcTemplate.queryForList(sql) = " + jdbcTemplate.queryForList(sql));
        redisTemplate.opsForValue().set("name","卷心菜");
       // String name = (String) RedisTemplateUtils.get("name");
        //System.out.println(name); //卷心菜
        return "hello  慧慧";
    }



}
